/**
 * 菜单模块路由文件
 */

const Router = require('koa-router');
const router = new Router();
const { getAll, getCurrentUserMenus, getRigthsByRoleId } = require('../services/menus');
const { authorization } = require('./common');

router.prefix('/menus');

router.get('/all', authorization('rightsSet'), getAll);

router.get('/myMenus', getCurrentUserMenus);

router.get('/rights/:id', authorization('rightsSet'), getRigthsByRoleId);

module.exports = router;